package com.pig4cloud.pigx.order.api.feign;

import com.pig4cloud.pigx.common.core.constant.SecurityConstants;
import com.pig4cloud.pigx.common.core.constant.ServiceNameConstants;
import com.pig4cloud.pigx.common.core.util.R;
import com.pig4cloud.pigx.shop.user.api.dto.CustomToUserOrderSummaryDTO;
import com.pig4cloud.pigx.shop.user.api.vo.CustomToUserOrderSummaryVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

@FeignClient(contextId = "remoteOrderInfoService", value = ServiceNameConstants.SHOP_ORDER_SERVICE)
public interface RemoteOrderInfoService {

	/**
	 *
	 * @param customToUserOrderSummaryDTO
	 * @return
	 */
	@PostMapping("/order/getCustomToUserOrderSummary")
	List<CustomToUserOrderSummaryVO> getCustomToUserOrderSummary(@RequestBody CustomToUserOrderSummaryDTO customToUserOrderSummaryDTO, @RequestHeader(SecurityConstants.FROM) String from);
}
